package com.intelligent.mts.client;

import com.intelligent.mts.common.utils.PropertyManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import javax.swing.*;

/**
 * Created by Peter on 2016/7/12.
 */
public class Launcher {
    private final Logger logger = LoggerFactory.getLogger(Launcher.class);

    public void launch() {
        logger.info("Launch client...");
        ApplicationContext context = new ClassPathXmlApplicationContext("classpath*:spring/spring*.xml");
//        System.out.println(PropertyManager.getProperty("FLOWS"));
        logger.info("Launch done.");
    }

    public static void main(String[] args) {
        try {
            UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticXPLookAndFeel");
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }

        Launcher launcher = new Launcher();
        launcher.launch();
    }
}
